#include "sphere.h"

// see sphere.h
void Sphere::area(void) {
    double area = 4 * PI * pow((double) this->r, 2.0);
    cout << "\nArea of a sphere is 4 * " << cPI << " * (" << (double)this->r << ")^2 = " << area;
}

// see sphere.h
void Sphere::perimeter(void) {
    cout << "\nPerimeter is not defined for a sphere.";
}

// see sphere.h
void Sphere::volume(void) {
    double volume = (4.0/3.0) * PI * pow((double)this->r, 3);
    cout << "\nVolume of a sphere is 4/3 * " << cPI << " * (" << (double)this->r << ")^3 = " << volume;
}